package com.hejia.alauda.entity;

import java.util.Date;

import javax.persistence.Column;

/**
 * 
 * 用户意见反馈实体类
 *
 *
 * Created by showone on 2014 上午9:20:45.
 */
public class Feedback extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 反馈状态
	 *
	 */
	public enum Status {

		New, Processed;

		public String getName() {

			String name = "未知";

			switch (this) {
			case New:
				name = "未处理";
				break;
			case Processed:
				name = "已处理";
				break;
			}

			return name;
		}
	}

	public Feedback() {
		this.setModifyDate(new Date());
		this.setStatus(Status.New);
	}

	@Column
	private User user;// 反馈提交人

	@Column
	private String content;// 反馈内容

	@Column
	private String reply;// 反馈回复

	@Column
	private Status status;// 状态

	@Column
	private String contact;// 联系方式

	@Column
	private String replyer;// 回复人

	@Column
	private String url;// 意见图片

	@Column
	private String os;// 平台

	@Column
	private String version;// 版本

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getReply() {
		return reply;
	}

	public void setReply(String reply) {
		this.reply = reply;
	}

	public Status getStatus() {
		return status;
	}

	public void setStatus(Status status) {
		this.status = status;
	}

	public String getStatusName() {

		if (this.getStatus() == null) {
			return "未知";
		} else {
			return this.getStatus().getName();
		}
	}

	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	public String getReplyer() {
		return replyer;
	}

	public void setReplyer(String replyer) {
		this.replyer = replyer;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getOs() {
		return os;
	}

	public void setOs(String os) {
		this.os = os;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

}
